package com.eastfair.venuebooking.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.eastfair.annotation.annotation.vo.VoInfo;
import com.eastfair.annotation.model.BaseVoGroupClass;
import com.eastfair.core.base.entity.SuperEntity;
import com.eastfair.venuebooking.demand.ExhibitionGroup;
import com.eastfair.venuebooking.enumeration.*;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.Data;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 实体类
 * 展会
 * </p>
 *
 * @author linan
 * @since 2022-06-27
 */
@Data
@ApiModel(value = "ExhibitionUpdateDTO", description = "展会")
public class ExhibitionDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 校验标识
     */
    public interface Check {};
    
    public interface CopyCheck {};

    @ApiModelProperty(value = "主键id")
    @NotNull(message = "请填写主键", groups = {SuperEntity.Update.class,CopyCheck.class})
    private Long id;

    /**
     * 归属人员
     */
    @ApiModelProperty(value = "归属人员")
    private Long belongTo;
    /**
     * 归属人员姓名
     */
    @ApiModelProperty(value = "归属人员姓名")
    @Size(max = 255, message = "归属人员姓名长度不能超过255",groups = {Check.class})
    private String belongToName;
    /**
     * 归属人员部门id
     */
    @ApiModelProperty(value = "归属人员部门id")
    private Long orgCode;
    /**
     * 展会名称
     */
    @ApiModelProperty(value = "展会名称")
    @Size(max = 255, message = "展会名称长度不能超过255",groups = {Check.class,CopyCheck.class})
    @NotBlank(message = "展会名称不能为空",groups = {Check.class,CopyCheck.class})
    private String exhibitionName;
    /**
     * 外部展会唯一标识
     */
    @ApiModelProperty(value = "外部展会唯一标识")
    @Size(max = 64, message = "外部展会唯一标识长度不能超过64")
    private String externalExhibitionCode;
    /**
     * 客户id
     */
    @ApiModelProperty(value = "客户id")
    @NotNull(message = "客户id不能为空")
    private Long customerId;
    /**
     * 客户名称
     */
    @ApiModelProperty(value = "客户名称")
    @NotBlank(message = "客户名称不能为空",groups = {Check.class})
    private String customerName;
    /**
     * 客户联系人
     */
    @ApiModelProperty(value = "客户联系人")
    private Long cutomerContactsId;
    /**
     * 客户联系人名称
     */
    @ApiModelProperty(value = "客户联系人名称")
    @Size(max = 255, message = "客户联系人名称长度不能超过255",groups = {Check.class})
    private String cutomerContactsName;
    /**
     * 商机id
     */
    @ApiModelProperty(value = "商机id")
    private Long businessOpportunityId;
    /**
     * 展览开始时间
     */
    @NotNull(message = "展览开始时间不能为空",groups = {Check.class,CopyCheck.class})
    @ApiModelProperty(value = "展览开始时间")
    private LocalDateTime exhibitionStartTime;
    /**
     * 展览结束时间
     */
    @NotNull(message = "展览结束时间不能为空",groups = {Check.class,CopyCheck.class})
    @ApiModelProperty(value = "展览结束时间")
    private LocalDateTime exhibitionEndTime;
    /**
     * 布展开始时间
     */
    @NotNull(message = "布展开始时间不能为空",groups = {Check.class,CopyCheck.class})
    @ApiModelProperty(value = "布展开始时间")
    private LocalDateTime arrangementStartTime;
    /**
     * 布展结束时间
     */
    @NotNull(message = "布展结束时间不能为空",groups = {Check.class,CopyCheck.class})
    @ApiModelProperty(value = "布展结束时间")
    private LocalDateTime arrangementEndTime;
    /**
     * 撤展开始时间
     */
    @ApiModelProperty(value = "撤展开始时间")
    private LocalDateTime dismantlingStartTime;
    /**
     * 撤展结束时间
     */
    @ApiModelProperty(value = "撤展结束时间")
    private LocalDateTime dismantlingEndTime;

    /**
     * 展会性质 #{GOVERNMENT:政府展;BUSINESS:商业展;CONSUMPTION:消费展;TRADE:贸易展;OTHER:其他}
     */
    @ApiModelProperty(value = "展会性质 #{GOVERNMENT:政府展;BUSINESS:商业展;CONSUMPTION:消费展;TRADE:贸易展;OTHER:其他}")
    private ExhibitionExhibitionNatureEnum exhibitionNature;
    /**
     * 展会类型 #{EXHIBITION:展会;MEETING:会议;FORUM:论坛;OTHER:其他}
     */
    @ApiModelProperty(value = "展会类型 #{EXHIBITION:展会;MEETING:会议;FORUM:论坛;OTHER:其他}")
    private ExhibitionExhibitionTypeEnum exhibitionType;

    @ApiModelProperty(value = "主要负责人")
    @NotNull(message = "主要负责人不能为空",groups = {Check.class})
    private ExhibitionResponsibilityerSaveDTO mainInCharge;

    @ApiModelProperty(value = "协助人员")
    private List<ExhibitionResponsibilityerSaveDTO> assistingStaffList;

    /**
     * 中文简称
     */
    @ApiModelProperty(value = "中文简称")
    @Size(max = 255, message = "中文简称长度不能超过255",groups = {Check.class})
    private String exhibitionShortName;
    /**
     * 英文名称
     */
    @ApiModelProperty(value = "英文名称")
    @Size(max = 255, message = "英文名称长度不能超过255",groups = {Check.class})
    private String exhibitionEnName;
    /**
     * 英文简称
     */
    @ApiModelProperty(value = "英文简称")
    @Size(max = 255, message = "英文简称长度不能超过255",groups = {Check.class})
    private String exhibitionEnShortName;
    /**
     * 主办
     */
    @ApiModelProperty(value = "主办")
    @Size(max = 255, message = "主办长度不能超过255",groups = {Check.class})
    private String sponsorName;
    /**
     * 承办
     */
    @ApiModelProperty(value = "承办")
    @Size(max = 255, message = "承办长度不能超过255",groups = {Check.class})
    private String undertakerName;
    /**
     * 预定面积
     */
    @ApiModelProperty(value = "预定面积")
    private Integer reserveArea;
    /**
     * 预期人数
     */
    @ApiModelProperty(value = "预期人数")
    private Integer expectViewer;
    /**
     * logo地址
     */
    @ApiModelProperty(value = "logo地址")
    @Size(max = 255, message = "logo地址长度不能超过255",groups = {Check.class})
    private String logoUrl;
    /**
     * 展会介绍
     */
    @ApiModelProperty(value = "展会介绍")
    @Size(max = 300, message = "展会介绍长度不能超过300",groups = {Check.class})
    private String remark;
    /**
     * 官网地址
     */
    @ApiModelProperty(value = "官网地址")
    @Size(max = 255, message = "官网地址长度不能超过255",groups = {Check.class})
    private String exhibitionWebsite;

    /**
     * 展会状态 #{STATE_ONE:无状态;STATE_TWO:销售商机;STATE_THREE:报价确认;STATE_FOUR:活动确认;STATE_FIVE:创立合同;STATE_SIX:合同付款;STATE_SEVEN:活动结算;STATE_EIGHT:活动结束;STATE_NINE:其他状态}
     */
    @ApiModelProperty(value = "展会状态 #{STATE_ONE:无状态;STATE_TWO:销售商机;STATE_THREE:报价确认;STATE_FOUR:活动确认;STATE_FIVE:创立合同;STATE_SIX:合同付款;STATE_SEVEN:活动结算;STATE_EIGHT:活动结束;STATE_NINE:其他状态}")
    private ExhibitionStateEnum state;
    /**
     * 报价书id(跟展会没有强绑定关系，过渡到合同用的)
     */
    @ApiModelProperty(value = "报价书id(跟展会没有强绑定关系，过渡到合同用的)")
    private Long quotationId;

    /**
     * 展会项目id
     */
    @ApiModelProperty(value = "展会项目ID")
    private Long exhibitionProjectId;

    /**
     * 所属行业 #{INDUSTRY_ONE:农林渔牧;INDUSTRY_TWO:工业智造;INDUSTRY_THREE:新兴产业;INDUSTRY_FOUR:美好生活;OTHER:其他}
     */
    @ApiModelProperty(value = "所属行业 #{INDUSTRY_ONE:农林渔牧;INDUSTRY_TWO:工业智造;INDUSTRY_THREE:新兴产业;INDUSTRY_FOUR:美好生活;OTHER:其他}")
    private ExhibitionIndustryEnum industry;

    /**
     * 展会类型 #{SELF_EXHIBITION:自办展;GUEST_EXHIBITION:客展}
     */
    @ApiModelProperty(value = "展会类型 #{SELF_EXHIBITION:自办展;GUEST_EXHIBITION:客展}")
    @TableField(value = "exhibition_main_type")
    @Excel(name = "展会类型 #{SELF_EXHIBITION:自办展;GUEST_EXHIBITION:客展}", replace = {"自办展_SELF_EXHIBITION", "客展_GUEST_EXHIBITION",  "_null"})
    private ExhibitionExhibitionMainTypeEnum exhibitionMainType;

    @ApiModelProperty(value = "展会编号")
    @NotBlank(message = "业务编号不能为空",groups = {Check.class,CopyCheck.class})
    private String exhibitionNo;

    /**
     * 主办id集合
     */
    @ApiModelProperty(value = "主办id集合")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {ExhibitionGroup.queryExhibitionList.class})
    private List<Long> sponsorIds;

    /**
     * 承办id集合
     */
    @ApiModelProperty(value = "承办id集合")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {ExhibitionGroup.queryExhibitionList.class})
    private List<Long> undertakerIds;

    /**
     * 商机id集合
     */
    @ApiModelProperty(value = "商机id集合")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @VoInfo(groups = {ExhibitionGroup.queryExhibitionList.class})
    private List<Long> businessOpportunityIds;
}
